package session

import (
	"sync"
	"video/api/databases"
)

type SimpleSession struct {
	Username string
	TTL int64
}

var sessionMap  *sync.Map
func init()  {
	sessionMap = &sync.Map{}
}

func LoadSessionsFromDb()  {
    r,err:=databases.RetrieveAllSession()
    if err != nil {

	}
    r.Range(func(key, value interface{}) bool {
		ss:=v.(*session.S)
		sessionMap.Store(k,ss)
	})



}

func GenerateNewSessionId(un string) string  {

}

func InSessionExpired(sid string) (string,bool)  {

}


